{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "74fa47a5",
   "metadata": {},
   "source": [
    "# 上周学习内容"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a1e5d366",
   "metadata": {},
   "source": [
    "* Python 介绍"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7ec9b01a",
   "metadata": {},
   "source": [
    "* 了解IDLE窗口"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "66149260",
   "metadata": {},
   "source": [
    "* 观察标准库"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c5a84c1a",
   "metadata": {},
   "source": [
    "* 重要资源"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "33d4a3fc",
   "metadata": {},
   "source": [
    "> [Python官网](https://python.org)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "953bf7b6",
   "metadata": {},
   "source": [
    "> [blogg](https://cnbiogs.com/xuzhichao)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "244e2e0c",
   "metadata": {},
   "source": [
    "# 本周学习内容"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bdd06c8a",
   "metadata": {},
   "source": [
    "## python环境配置"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dcc03742",
   "metadata": {},
   "source": [
    "* A.[Pycharm](https://www.jetbrains.com/pycharm/)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f8b81bae",
   "metadata": {},
   "source": [
    "> a.  项目管理类的IDE"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e811d826",
   "metadata": {},
   "source": [
    "> b.[github education pack](https://education.github.com/pack)可获得免费一年专业版使用"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a66e87e3",
   "metadata": {},
   "source": [
    "## jupyter notebook"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f5f9e931",
   "metadata": {},
   "source": [
    "* [jupyter notebook](https://jupyter.org/)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a2cbb00a",
   "metadata": {},
   "source": [
    "* 什么是jupyter notebook:\n",
    "\n",
    "   1、jupyter是一个基于web的IDE（集成开发环境）。\n",
    "\n",
    "  2、兼具脚本操作和交互式操作的特性；\n",
    "\n",
    "  3、笔记式编辑代码和运行，便于调试，便于保存。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1b79e349",
   "metadata": {},
   "source": [
    "* [使用举例](https://www.kaggle.com/)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f68472c2",
   "metadata": {},
   "source": [
    "## 变量（数字、字符串、对象）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "84c9c306",
   "metadata": {},
   "source": [
    "### 数字"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "3aeacb40",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> 8+8"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "821925fe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.0"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> (50 - 5*6) / 4"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2f7365e7",
   "metadata": {},
   "source": [
    "### 字符串"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "93fb386a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\"Isn\\'t,\" they said.'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    ">>> 'spam eggs'  # single quotes\n",
    "'spam eggs'\n",
    ">>> 'doesn\\'t'  # use \\' to escape the single quote...\n",
    "\"doesn't\"\n",
    ">>> \"doesn't\"  # ...or use double quotes instead\n",
    "\"doesn't\"\n",
    ">>> '\"Yes,\" they said.'\n",
    "'\"Yes,\" they said.'\n",
    ">>> \"\\\"Yes,\\\" they said.\"\n",
    "'\"Yes,\" they said.'\n",
    ">>> '\"Isn\\'t,\" they said.'\n",
    "'\"Isn\\'t,\" they said.'"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4fb4d5da",
   "metadata": {},
   "source": [
    "### 对象"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "98364a91",
   "metadata": {},
   "source": [
    "* python中“一切皆是对象”。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a57796a3",
   "metadata": {},
   "source": [
    "### 声明变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "b019e369",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Yao Yao\n"
     ]
    }
   ],
   "source": [
    "name = \"Yao\"\n",
    "\n",
    "name2 = name\n",
    "print(name,name2)\n",
    "\n",
    "name = \"siwen\""
   ]
  },
  {
   "cell_type": "markdown",
   "id": "98d56f9a",
   "metadata": {},
   "source": [
    "## else语句"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "940eec84",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Work！\n"
     ]
    }
   ],
   "source": [
    "if right_this_minute == 'Saturday':\n",
    "    print('Party！')\n",
    "elif right_this_minute == 'Sunday':\n",
    "    print('Recover.')\n",
    "else:\n",
    "    print('Work！')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c98a0cc3",
   "metadata": {},
   "source": [
    "##  在奇数中找时间节点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "7313f569",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "This minute seems a little odd.\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime \n",
    "\n",
    "odds = [ 1,  3,  5,  7,  9, 11, 13, 15, 17, 19,\n",
    "        21, 23, 25, 27, 29, 31, 33, 35, 37, 39,\n",
    "        41, 43, 45, 47, 49, 51, 53, 55, 57, 59 ]\n",
    "\n",
    "right_this_minute = datetime.today().minute\n",
    "\n",
    "if right_this_minute in odds:\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f33ad1ff",
   "metadata": {},
   "source": [
    "## for 循环"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "6239ce90",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Not an odd minute\n",
      "Not an odd minute\n",
      "This minute seems a little odd.\n",
      "Not an odd minute\n",
      "Not an odd minute\n"
     ]
    }
   ],
   "source": [
    "from datetime import datetime\n",
    "\n",
    "import random\n",
    "import time\n",
    "\n",
    "odds = [ 1,  3,  5,  7,  9, 11, 13, 15, 17, 19,\n",
    "        21, 23, 25, 27, 29, 31, 33, 35, 37, 39,\n",
    "        41, 43, 45, 47, 49, 51, 53, 55, 57, 59 ]\n",
    "\n",
    "for i in range(5):\n",
    "    right_this_minute = datetime.today() .minute\n",
    "    if right_this_minute in odds:\n",
    "        print(\"This minute seems a little odd.\")\n",
    "    else:\n",
    "        print(\"Not an odd minute\")\n",
    "    wait_time = random.randint(1, 60)\n",
    "    time.sleep(wait_time)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8e166363",
   "metadata": {},
   "source": [
    "## 经典“啤酒歌谣”的Python版本"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "f53e4f02",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "99 botttles of beer on the wall.\n",
      "99 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "98 botttles of beer on the wall.\n",
      "98 botttles of beer on the wall.\n",
      "98 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "97 botttles of beer on the wall.\n",
      "97 botttles of beer on the wall.\n",
      "97 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "96 botttles of beer on the wall.\n",
      "96 botttles of beer on the wall.\n",
      "96 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "95 botttles of beer on the wall.\n",
      "95 botttles of beer on the wall.\n",
      "95 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "94 botttles of beer on the wall.\n",
      "94 botttles of beer on the wall.\n",
      "94 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "93 botttles of beer on the wall.\n",
      "93 botttles of beer on the wall.\n",
      "93 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "92 botttles of beer on the wall.\n",
      "92 botttles of beer on the wall.\n",
      "92 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "91 botttles of beer on the wall.\n",
      "91 botttles of beer on the wall.\n",
      "91 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "90 botttles of beer on the wall.\n",
      "90 botttles of beer on the wall.\n",
      "90 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "89 botttles of beer on the wall.\n",
      "89 botttles of beer on the wall.\n",
      "89 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "88 botttles of beer on the wall.\n",
      "88 botttles of beer on the wall.\n",
      "88 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "87 botttles of beer on the wall.\n",
      "87 botttles of beer on the wall.\n",
      "87 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "86 botttles of beer on the wall.\n",
      "86 botttles of beer on the wall.\n",
      "86 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "85 botttles of beer on the wall.\n",
      "85 botttles of beer on the wall.\n",
      "85 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "84 botttles of beer on the wall.\n",
      "84 botttles of beer on the wall.\n",
      "84 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "83 botttles of beer on the wall.\n",
      "83 botttles of beer on the wall.\n",
      "83 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "82 botttles of beer on the wall.\n",
      "82 botttles of beer on the wall.\n",
      "82 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "81 botttles of beer on the wall.\n",
      "81 botttles of beer on the wall.\n",
      "81 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "80 botttles of beer on the wall.\n",
      "80 botttles of beer on the wall.\n",
      "80 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "79 botttles of beer on the wall.\n",
      "79 botttles of beer on the wall.\n",
      "79 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "78 botttles of beer on the wall.\n",
      "78 botttles of beer on the wall.\n",
      "78 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "77 botttles of beer on the wall.\n",
      "77 botttles of beer on the wall.\n",
      "77 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "76 botttles of beer on the wall.\n",
      "76 botttles of beer on the wall.\n",
      "76 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "75 botttles of beer on the wall.\n",
      "75 botttles of beer on the wall.\n",
      "75 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "74 botttles of beer on the wall.\n",
      "74 botttles of beer on the wall.\n",
      "74 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "73 botttles of beer on the wall.\n",
      "73 botttles of beer on the wall.\n",
      "73 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "72 botttles of beer on the wall.\n",
      "72 botttles of beer on the wall.\n",
      "72 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "71 botttles of beer on the wall.\n",
      "71 botttles of beer on the wall.\n",
      "71 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "70 botttles of beer on the wall.\n",
      "70 botttles of beer on the wall.\n",
      "70 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "69 botttles of beer on the wall.\n",
      "69 botttles of beer on the wall.\n",
      "69 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "68 botttles of beer on the wall.\n",
      "68 botttles of beer on the wall.\n",
      "68 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "67 botttles of beer on the wall.\n",
      "67 botttles of beer on the wall.\n",
      "67 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "66 botttles of beer on the wall.\n",
      "66 botttles of beer on the wall.\n",
      "66 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "65 botttles of beer on the wall.\n",
      "65 botttles of beer on the wall.\n",
      "65 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "64 botttles of beer on the wall.\n",
      "64 botttles of beer on the wall.\n",
      "64 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "63 botttles of beer on the wall.\n",
      "63 botttles of beer on the wall.\n",
      "63 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "62 botttles of beer on the wall.\n",
      "62 botttles of beer on the wall.\n",
      "62 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "61 botttles of beer on the wall.\n",
      "61 botttles of beer on the wall.\n",
      "61 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "60 botttles of beer on the wall.\n",
      "60 botttles of beer on the wall.\n",
      "60 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "59 botttles of beer on the wall.\n",
      "59 botttles of beer on the wall.\n",
      "59 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "58 botttles of beer on the wall.\n",
      "58 botttles of beer on the wall.\n",
      "58 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "57 botttles of beer on the wall.\n",
      "57 botttles of beer on the wall.\n",
      "57 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "56 botttles of beer on the wall.\n",
      "56 botttles of beer on the wall.\n",
      "56 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "55 botttles of beer on the wall.\n",
      "55 botttles of beer on the wall.\n",
      "55 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "54 botttles of beer on the wall.\n",
      "54 botttles of beer on the wall.\n",
      "54 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "53 botttles of beer on the wall.\n",
      "53 botttles of beer on the wall.\n",
      "53 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "52 botttles of beer on the wall.\n",
      "52 botttles of beer on the wall.\n",
      "52 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "51 botttles of beer on the wall.\n",
      "51 botttles of beer on the wall.\n",
      "51 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "50 botttles of beer on the wall.\n",
      "50 botttles of beer on the wall.\n",
      "50 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "49 botttles of beer on the wall.\n",
      "49 botttles of beer on the wall.\n",
      "49 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "48 botttles of beer on the wall.\n",
      "48 botttles of beer on the wall.\n",
      "48 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "47 botttles of beer on the wall.\n",
      "47 botttles of beer on the wall.\n",
      "47 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "46 botttles of beer on the wall.\n",
      "46 botttles of beer on the wall.\n",
      "46 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "45 botttles of beer on the wall.\n",
      "45 botttles of beer on the wall.\n",
      "45 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "44 botttles of beer on the wall.\n",
      "44 botttles of beer on the wall.\n",
      "44 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "43 botttles of beer on the wall.\n",
      "43 botttles of beer on the wall.\n",
      "43 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "42 botttles of beer on the wall.\n",
      "42 botttles of beer on the wall.\n",
      "42 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "41 botttles of beer on the wall.\n",
      "41 botttles of beer on the wall.\n",
      "41 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "40 botttles of beer on the wall.\n",
      "40 botttles of beer on the wall.\n",
      "40 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "39 botttles of beer on the wall.\n",
      "39 botttles of beer on the wall.\n",
      "39 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "38 botttles of beer on the wall.\n",
      "38 botttles of beer on the wall.\n",
      "38 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "37 botttles of beer on the wall.\n",
      "37 botttles of beer on the wall.\n",
      "37 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "36 botttles of beer on the wall.\n",
      "36 botttles of beer on the wall.\n",
      "36 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "35 botttles of beer on the wall.\n",
      "35 botttles of beer on the wall.\n",
      "35 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "34 botttles of beer on the wall.\n",
      "34 botttles of beer on the wall.\n",
      "34 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "33 botttles of beer on the wall.\n",
      "33 botttles of beer on the wall.\n",
      "33 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "32 botttles of beer on the wall.\n",
      "32 botttles of beer on the wall.\n",
      "32 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "31 botttles of beer on the wall.\n",
      "31 botttles of beer on the wall.\n",
      "31 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "30 botttles of beer on the wall.\n",
      "30 botttles of beer on the wall.\n",
      "30 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "29 botttles of beer on the wall.\n",
      "29 botttles of beer on the wall.\n",
      "29 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "28 botttles of beer on the wall.\n",
      "28 botttles of beer on the wall.\n",
      "28 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "27 botttles of beer on the wall.\n",
      "27 botttles of beer on the wall.\n",
      "27 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "26 botttles of beer on the wall.\n",
      "26 botttles of beer on the wall.\n",
      "26 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "25 botttles of beer on the wall.\n",
      "25 botttles of beer on the wall.\n",
      "25 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "24 botttles of beer on the wall.\n",
      "24 botttles of beer on the wall.\n",
      "24 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "23 botttles of beer on the wall.\n",
      "23 botttles of beer on the wall.\n",
      "23 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "22 botttles of beer on the wall.\n",
      "22 botttles of beer on the wall.\n",
      "22 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "21 botttles of beer on the wall.\n",
      "21 botttles of beer on the wall.\n",
      "21 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "20 botttles of beer on the wall.\n",
      "20 botttles of beer on the wall.\n",
      "20 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "19 botttles of beer on the wall.\n",
      "19 botttles of beer on the wall.\n",
      "19 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "18 botttles of beer on the wall.\n",
      "18 botttles of beer on the wall.\n",
      "18 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "17 botttles of beer on the wall.\n",
      "17 botttles of beer on the wall.\n",
      "17 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "16 botttles of beer on the wall.\n",
      "16 botttles of beer on the wall.\n",
      "16 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "15 botttles of beer on the wall.\n",
      "15 botttles of beer on the wall.\n",
      "15 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "14 botttles of beer on the wall.\n",
      "14 botttles of beer on the wall.\n",
      "14 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "13 botttles of beer on the wall.\n",
      "13 botttles of beer on the wall.\n",
      "13 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "12 botttles of beer on the wall.\n",
      "12 botttles of beer on the wall.\n",
      "12 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "11 botttles of beer on the wall.\n",
      "11 botttles of beer on the wall.\n",
      "11 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "10 botttles of beer on the wall.\n",
      "10 botttles of beer on the wall.\n",
      "10 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "9 botttles of beer on the wall.\n",
      "9 botttles of beer on the wall.\n",
      "9 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "8 botttles of beer on the wall.\n",
      "8 botttles of beer on the wall.\n",
      "8 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "7 botttles of beer on the wall.\n",
      "7 botttles of beer on the wall.\n",
      "7 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "6 botttles of beer on the wall.\n",
      "6 botttles of beer on the wall.\n",
      "6 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "5 botttles of beer on the wall.\n",
      "5 botttles of beer on the wall.\n",
      "5 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "4 botttles of beer on the wall.\n",
      "4 botttles of beer on the wall.\n",
      "4 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "3 botttles of beer on the wall.\n",
      "3 botttles of beer on the wall.\n",
      "3 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "2 botttles of beer on the wall.\n",
      "2 botttles of beer on the wall.\n",
      "2 botttles of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "1 bottle of beer on the wall.\n",
      "1 bottle of beer on the wall.\n",
      "1 bottle of beer.\n",
      "Take one down.\n",
      "Pass it around.\n",
      "No more bottles of beer of beer on the wall.\n"
     ]
    }
   ],
   "source": [
    "word = \"botttles\"\n",
    "for beer_num in range(99, 0, -1):\n",
    "    print(beer_num, word, \"of beer on the wall.\")\n",
    "    print(beer_num, word, \"of beer.\")\n",
    "    print(\"Take one down.\")\n",
    "    print(\"Pass it around.\")\n",
    "    if beer_num == 1:\n",
    "        print(\"No more bottles of beer of beer on the wall.\")\n",
    "    else:\n",
    "        new_num = beer_num - 1\n",
    "        if new_num == 1:\n",
    "            word = \"bottle\"\n",
    "        print(new_num, word, \"of beer on the wall.\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "573.6px",
    "left": "154px",
    "top": "171.8px",
    "width": "303.825px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
